1. Technical Field
This invention relates to a method and apparatus for synchronising information across a set of computer applications.
Information used in a computer application can take many forms, with an example being financial or accounting data. The information may be sales order information, invoice information, stock information or any of the other types of financial information that is used.
Each information entry is referred to as an object and objects are stored in data stores.
A problem is encountered when objects that are replicated across several data stores are modified. The ideal situation is that any modification is instantaneously reflected across all replicas such that the information is up-to-date everywhere. Due to objective constraints such as connection reliability and latency, resilience or the desire to keep objects highly available, it is not practicable (and in most cases not necessary) to keep the whole network of applications up-to-date all the time.
It is therefore considered that the applications interact and exchange information with the aim of achieving a consistent underlying content. This interaction is called synchronisation.
2. Description of Related Art
An existing method for synchronising data uses vector clock synchronisation, which uses an algorithm for generating a partial ordering of events in a distributed system and detecting causality violations. Interprocess messages contain the state of the sending process's logical clock. A vector clock of a system of N processes is an array of N logical clocks, one per process, a local copy of which is kept in each process with the following rules for clock updates.
Initially all clocks are zero.
Each time a process experiences an internal event, it increments its own logical clock in the vector by one.
Each time a process prepares to send a message, it sends its entire vector along with the message being sent.
Each time a process receives a message, it compares the vector clock included in the message with its own vector clock. If the vector clock included in the message is strictly greater than the vector clock of the process, the process accepts the new state contained in the message and replaces its vector clock by the vector clock contained in the message. If the vector clock included in the message is strictly smaller than the vector clock of the process, the process ignores the message. If the two vector clocks are not comparable (each one has an entry that it strictly greater than the corresponding entry in the other one), the receiving process signals a conflict and applies a conflict handling rule to update its state.
The vector clock is attached to each object in a data store. Synchronisation is achieved by using the algorithm outlined above.
It is an object of the present invention to provide a more efficient method of synchronising data sets.